package com.whcoding.test.constant;

import com.google.common.collect.Lists;
import com.whcoding.test.pojo.GoodsTestVO;
import com.whcoding.test.pojo.OrmCustomerVO;
import com.whcoding.test.pojo.UserTestVO;

import java.math.BigDecimal;
import java.util.*;

/**
 * @program: spring-boot-learning
 * @description:
 * @author: whcoding
 * @create: 2022-02-15 14:41
 **/
public class ConstantVO {
	/**
	 * @return
	 */
	public static List<OrmCustomerVO> getCustomerVOList() {

		List<OrmCustomerVO> customerVOList = new ArrayList<>();
		OrmCustomerVO c1 = new OrmCustomerVO();
		c1.setId(Long.parseLong("1"));
		c1.setCustomerName("西安客户");
		c1.setCustomerNo("XA001");
		c1.setCustomerId(001);
		c1.setCustomerAddress("西安市雁塔区鱼化寨街道天谷八路数字出版基地");
		c1.setCustomerType(1);
		c1.setCustomerFund(new BigDecimal("366.36"));
		c1.setOrderDate(new Date());
		c1.setOrderNo("2020081601");
		c1.setOrderId("ID_01");
		c1.setIsValid(1);


		OrmCustomerVO c2 = new OrmCustomerVO();

		c2.setId(Long.parseLong("2"));
		c2.setCustomerName("上海客户");
		c2.setCustomerNo("SH001");
		c2.setCustomerId(002);
		c2.setCustomerAddress("上海市青浦区重固镇北青公路6558号意邦大厦");
		c2.setCustomerType(2);
		c2.setCustomerFund(new BigDecimal("1366.36"));
		c2.setOrderDate(new Date());
		c2.setOrderNo("2020081602");
		c2.setOrderId("ID_02");
		c2.setIsValid(1);


		OrmCustomerVO c3 = new OrmCustomerVO();
		c3.setId(Long.parseLong("3"));
		c3.setCustomerName("杭州客户");
		c3.setCustomerNo("HZ001");
		c3.setCustomerId(003);
		c3.setCustomerAddress("杭州市");
		c3.setCustomerType(3);
		c3.setCustomerFund(new BigDecimal("166.36"));
		c3.setOrderDate(new Date());
		c3.setOrderNo("2020081603");
		c3.setOrderId("ID_03");
		c3.setIsValid(1);

		OrmCustomerVO c4 = new OrmCustomerVO();
		c4.setId(Long.parseLong("4"));
		c4.setCustomerName("杭州客户");
		c4.setCustomerNo("HZ001");
		c4.setCustomerId(004);
		c4.setCustomerAddress("杭州市");
		c4.setCustomerType(3);
		c4.setCustomerFund(new BigDecimal("166.36"));
		c4.setOrderDate(new Date());
		c4.setOrderNo("2020081603");
		c4.setOrderId("ID_03");
		c4.setIsValid(1);

		OrmCustomerVO c5 = new OrmCustomerVO();
		c5.setId(Long.parseLong("5"));
		c5.setCustomerName("杭州客户");
		c5.setCustomerNo("HZ001");
		c5.setCustomerId(005);
		c5.setCustomerAddress("杭州市滨江区");
		c5.setCustomerType(3);
		c5.setCustomerFund(new BigDecimal("166.36"));
		c5.setOrderDate(new Date());
		c5.setOrderNo("2020081603");
		c5.setOrderId("ID_03");
		c5.setIsValid(1);


		customerVOList.add(c1);
		customerVOList.add(c2);
		customerVOList.add(c3);
		customerVOList.add(c4);
		customerVOList.add(c5);

		return customerVOList;
	}



	public static List<Map<String, Object>> getMapList(){
		List<Map<String, Object>> list = new ArrayList<>();
		Map<String, Object> map0 = new HashMap<>(16);
		map0.put("address", "北京");
		map0.put("sex", "女");
		map0.put("name", "小丽");
		map0.put("age", "23");
		Map<String, Object> map1 = new HashMap<>(16);
		map1.put("address", "西安");
		map1.put("sex", "女");
		map1.put("name", "张三");
		map1.put("age", "20");
		Map<String, Object> map2 = new HashMap<>(16);
		map2.put("address", "广州");
		map2.put("sex", "男");
		map2.put("name", "小王");
		map2.put("age", "2");
		Map<String, Object> map3 = new HashMap<>(16);
		map3.put("address", "北京");
		map3.put("sex", "男");
		map3.put("name", "小丽");
		map3.put("age", "27");
		Map<String, Object> map4 = new HashMap<>(16);
		map4.put("address", "厦门");
		map4.put("sex", "男");
		map4.put("name", "小王");
		map4.put("age", "29");
		Map<String, Object> map5 = new HashMap<>(16);
		map5.put("address", "北京");
		map5.put("sex", "女");
		map5.put("name", "小丽");
		map5.put("age", "28");
		list.add(map0);
		list.add(map1);
		list.add(map2);
		list.add(map3);
		list.add(map4);
		list.add(map5);
		return list;
	}


	public static List<UserTestVO> getUserTestVOList() {
		List<UserTestVO> userTestVOS = new ArrayList<>();
		userTestVOS.add(getUserTestVO());
		userTestVOS.add(getUserTestVO2());
		return userTestVOS;
	}


	public static UserTestVO getUserTestVO() {
		UserTestVO userTestVO = new UserTestVO();
		userTestVO.setUserId(0L);
		userTestVO.setUserName("蓝胖子");
		userTestVO.setUserNo("LPZ");
		userTestVO.setAge(18);
		userTestVO.setBirthday(new Date());
		userTestVO.setSalary(new BigDecimal("12.34"));
		userTestVO.setItemGoods(Lists.newArrayList(getGoodsVO()));
		return userTestVO;
	}

	public static UserTestVO getUserTestVO2() {
		UserTestVO userTestVO = new UserTestVO();
		userTestVO.setUserId(10L);
		userTestVO.setUserName("蓝胖子2");
		userTestVO.setUserNo("LPZ2");
		userTestVO.setAge(188);
		userTestVO.setBirthday(new Date());
		userTestVO.setSalary(new BigDecimal("13.34"));
		userTestVO.setItemGoods(Lists.newArrayList(getGoodsVO2()));
		return userTestVO;
	}


	public static GoodsTestVO getGoodsVO() {
		GoodsTestVO goodsTestVO = new GoodsTestVO();
		goodsTestVO.setPhoneNum("123456");
		goodsTestVO.setPhoneBrand("Iphone");
		goodsTestVO.setUsePhoneYear(2);
		goodsTestVO.setPrice(new BigDecimal("5999.99"));
		return goodsTestVO;
	}

	public static GoodsTestVO getGoodsVO2() {
		GoodsTestVO goodsTestVO = new GoodsTestVO();
		goodsTestVO.setPhoneNum("654321");
		goodsTestVO.setPhoneBrand("三星");
		goodsTestVO.setUsePhoneYear(1);
		goodsTestVO.setPrice(new BigDecimal("3999.99"));
		return goodsTestVO;
	}


}
